//back to top
function backTopHandle() {
	var backTop = $('.j_backTop');
	if( backTop.length > 0 ) {
		backTop.click(function(){
			window.scrollTop(0, 0);
		});
	}
}
//go to history
function backHistory() {
	var goBack = $('.j_backHistory');
	if (goBack.length > 0) {
		goBack.click(function() {
			window.history.lenght <= 1 ? window.location.href = 'http://sina.cn' : window.history.go(-1);
		});
			
	}
}

window.addEventListener('load', function() {
	backTopHandle();
	backHistory();
}, false);